package com.crm.model.vo.returnMoney;

import com.crm.common.util.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author: baijian
 * @date 2021/3/26 15:35
 */
@Data
public class CustFinanceProductOderVO {

    //订单完成的产品id
    private String finishOrderProductId;

    //产品号
    private String finishOrderProductNum;

    //产品id
    private String productId;

    //产品名称
    private String productName;

    //产品编码
    private String productCode;

    //订单明细类型--1:产品类型;2:活动类型;3:赠品活动类型
    private String orderDetailType;

    //产品原价
    private BigDecimal productOriginalPrice;

    //产品单价
    private BigDecimal productUnitPrice;

    //成交价
    private BigDecimal productFinalPrice;

    //数量
    private Integer productQuantity;

    //产品分类 0:非会员;1:会员
    private String productCategories;

    //订单id
    private String productOrderId;

    //订单编号
    private String orderNumber;

    //合同id
    private String contractId;

    //合同编号
    private String contractNumber;

    //兑换方式：1-电子卡；2-兑换码；3-学习码；4-充值码;5-税法直通车学习卡;6:其他
    private String exchangeMethod;

    //产品状态
    private String productStatus;

    //产品状态(显示值)
    private String productStatusText;

    //是否补款升级合同，兑换状态 0:未兑换；1:已兑换
    private String exchangeStatus;

    public String getProductStatusText(){
        String productStatusText = "";
        if(!StringUtils.isBlank(productStatus)){
            switch(productStatus){
                case "0" :
                    productStatusText = "未回款";
                    break;
                case "1" :
                    productStatusText = "退款";
                    break;
                case "2" :
                    productStatusText = "部分回款";
                    break;
                case "3" :
                    productStatusText = "已回款";
                    break;
                case "4" :
                    productStatusText = "作废";
                    break;
                case "5" :
                    productStatusText = "已兑换";
                    break;
                case "6" :
                    productStatusText = "预回款";
                    break;
                case "7" :
                    productStatusText = "兑换产品";
                    break;
                default :
                    break;
            }
        }
        return productStatusText;
    }
}
